<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>PetStore Management</title>
<!--    <link rel="Stylesheet" href="../css/jpetstore.css" type="text/css" media="screen"/>-->
    <script th:src="@{../js/jquery-3.6.0.min.js}"></script>
</head>
<style>
    *{
        padding: 0px;
        margin: 0px;
    }
    #Content {
        width: 100%;
        height: 70ex;
        color: #333;
        background-color: rgba(256,256,256,0.5);
        border-width: 0;
        position: relative;
        overflow: hidden;

    }
    a{
        display: block;
        text-decoration: none;
        color: #eaac00;
        font-weight: bold;
    }
    .Returnto{
        display: inline-block;
        float: left;
        position: absolute;
        top: 1ex;
        left: 2ex;
        height: 5ex;
        width: 50ex;
        background-image: url("../image/ReturntoManagementMainMenu.png");
        background-size: 100%;
        background-repeat: no-repeat;
        border-color: #eaac00;
        border-width: 0.4ex;
        border-style: solid;
    }
    table{
        display: block;
        /*position: absolute;*/
        /*top: 10ex;*/
        /*left: 10ex;*/
        margin-top: 10%;
        margin-left: 32%;
        width: 45ex;
        font-size: 3ex;
        background-color: #ffffff;
        border-color: #56832c;
        border-width: 1ex;
        border-style: solid;
        margin-bottom: 10ex;
    }
    table tr{
        height: 3ex;
        text-align: left;
    }
    table td{
        width: 10ex;
    }
    .images{
        height: 15ex;
        width: 15ex;
        position: absolute;
    }
    h2{

        float: left;
        position: absolute;
        top: 1ex;
        left: 8ex;
        font-size: 5ex;
    }
    input {
        float: left;
        position: absolute;
        border-width: .3ex .3ex .3ex .3ex;
        border-style: solid;
        border-color: #eaac00;
        background-color: #ffffff;
        color: #eaac00;
        height: 3ex;
        font-size: 3ex;
    }
   label{
        display: inline-block;
        float: left;
        position: absolute;
        font-size: 3ex;
    }
   #Catalog{
       width: 80ex;
       height: 60ex;
       background-color: #ffffff;
       margin-top: 5ex;
       margin-bottom: 1ex;
       margin-left: 30%;
       position: relative;
       border-color: #56832c;
       border-width: 1ex;
       border-style: solid;
   }

</style>
<body>
<div th:replace="manageCommon/managetop"></div>
<div id="Content">
    <a class="Returnto" href="/manage/main"></a>
<!--    <div th:replace="petmanagement/topSearch"></div>-->
    <div id="Catalog">
        <h2>Category Edit</h2>
        <form action="/manage/saveCategory" method="post" id="editCategory" enctype ="multipart/form-data">
            <label style="left: 7ex;top: 7ex ">Category ID: </label>
            <input style="left: 19ex;top: 6ex ;width: 15ex" type="text" id="categoryid" name="categoryid" th:value="${session.selectedCategory.categoryId}" /><br/>
            <label style="left: 3.8ex;top: 12ex ">Category Name: </label>
            <input style="left: 19ex;top: 12ex ;width: 15ex" type="text" th:value="${session.selectedCategory.name}" name="name"/><br/>
            <label style="left: 3.5ex;top: 28ex ">Category Image:</label>
            <img  style="left: 30ex;top: 27ex "class="images" th:src="${session.selectedCategory.description}">
            <input  style="left: 19ex;top: 28ex;width: 20ex" type="file" id="imagepath" name="imagepath"><br/>
            <input style="left: 20ex;top: 34ex;width: 10ex " type="submit" value="Save" id="save">
        </form>
        <input style="top: 38ex;left: -40ex" type="button" value="Return" th:onclick="returnCate()">
    </div>
    <script>
        function returnCate(){
            location.href="/manage/intoPetManage";
        }
    </script>
</div>
<div th:replace="manageCommon/managebottom"></div>
</body>
</html>